package day0716;

import javax.swing.*;
import java.awt.*;

public class Test1 {
    public static void main(String[] args) {
        JFrame win=new JFrame();//1.窗口    //墙

        MyPane pane=new MyPane();//2.面板  //黑板


        win.add(pane);//3.窗口包含面板
        win.setSize(1112,888);
        win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        win.setVisible(true);
        win.setLocationRelativeTo(null);
    }
}


//2.
class  MyPane  extends  JPanel{

    public void paint(Graphics g) {//黑板绘制方法  //Graphics g画笔
        g.drawString("羊了个羊小游戏", 0, 0);
    }
}
